<html>
<head>
    <title>Code for Systems Biology</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="shortcut icon" href="http://informatics-apps.systemsbiology.net/isbfavicon.ico" type="image/x-icon"/>

    <link rel="stylesheet" type="text/css" href="http://informatics-apps.systemsbiology.net/ext-js-3.3.1/resources/css/ext-all.css">
    <link rel="stylesheet" type="text/css" href="http://informatics-apps.systemsbiology.net/ext-js-3.3.1/examples/shared/examples.css"/>

    <script type="text/javascript" src="http://informatics-apps.systemsbiology.net/ext-js-3.3.1/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="http://informatics-apps.systemsbiology.net/ext-js-3.3.1/ext-all.js"></script>

    <script type="text/javascript" src="http://informatics-apps.systemsbiology.net/cytoscapeweb_v0.8/js/min/AC_OETags.min.js"></script>
    <script type="text/javascript" src="http://informatics-apps.systemsbiology.net/cytoscapeweb_v0.8/js/min/cytoscapeweb.min.js"></script>

    <script type="text/javascript" src="http://addama.googlecode.com/svn/tags/2.1/user-interfaces/src/main/html/addama/ui/query_parameters.js"></script>

    <link href="css/stylesheet.css" rel="stylesheet" type="text/css" media="all"/>
    
    <script type="text/javascript">
        function loadVis() {
            var uri = get_parameter("URI");
            if (uri) {
                Ext.Ajax.request({
                    url: uri,
                    method: "GET",
                    success: loadNetwork,
                    failure: function(o) {
                        Ext.getDom("cytoscapeweb").innerHTML = o.responseText;
                    }
                })
            } else {
                Ext.getDom("cytoscapeweb").innerHTML = "Missing required URI query parameter";
            }
        }

       function loadNetwork(o) {
           var network = Ext.util.JSON.decode(o.responseText);
           var vis = new org.cytoscapeweb.Visualization("cytoscapeweb", {
                swfPath: "http://informatics-apps.systemsbiology.net/cytoscapeweb_v0.8/swf/CytoscapeWeb",
                flashInstallerPath: "http://informatics-apps.systemsbiology.net/cytoscapeweb_v0.8/swf/playerProductInstall"
            });
           vis.draw({
               network: network,
               nodeTooltipsEnabled: true,
               edgeTooltipsEnabled: true
           });
       }
        
        Ext.onReady(loadVis);
    </script>
</head>
<body>
    <div id="header"><a href="http://codeforsystemsbiology.googlecode.com" target="_blank"><img src="images/banner.png" alt="Logo" /></a></div>
    <div id="cytoscapeweb"></div>
</body>
</html>